<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>对象</title>
</head>
<body>
<script>  
const person = {}

// 添加一个name属性
Object.defineProperty(person, 'name', {
  value: 'TOM'
})

console.log(person.name) // TOM

</script>
</body>
</html>